import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: "/Home",
  },
  {
    path: '/Home',
    name: 'Home',
    component: Home
  },
  {
    path: '/classification',
    name: 'classification',
    component: () => import('../views/classification.vue')
  },
  {
    path: '/ShoppingCart',
    name: 'ShoppingCart',
    component: () => import('../views/ShoppingCart.vue')
  },
  {
    path: '/My',
    name: 'My',
    component: () => import('../views/My.vue')
  },
  {
    path: '/details',
    name: 'details',
    component: () => import('../views/details.vue')
  },
  {
    path: '/address',
    name: 'address',
    component: () => import('../views/address.vue')
  },
  {
    path: '/order',
    name: 'order',
    component: () => import('../views/order.vue')
  },
  {
    path: '/payment',
    name: 'payment',
    component: () => import('../views/payment.vue')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/search.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue')
  },
  {
    path: '/smartDetail',
    name: 'smartDetail',
    component: () => import('../views/smartDetail.vue')
  },
  {
    path: '/purchase',
    name: 'purchase',
    component: () => import('../views/purchase.vue')
  },
  {
    path: '/commodityList',
    name: 'commodityList',
    component: () => import('../views/commodityList.vue')
  },
  {
    path: '/orderDetails',
    name: 'orderDetails',
    component: () => import('../views/orderDetails.vue')
  },
  {
    path: '/hotSelling',
    name: 'hotSelling',
    component: () => import('../views/hotSelling.vue')
  },
]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router